BuffEffect4 = BaseBuffEffect:new();
BuffEffect4.__index = BuffEffect4;

function BuffEffect4:new()
    local object = {};
    setmetatable(object, BuffEffect4);
    return object;
end

function BuffEffect4:action(fight,buff,...)
    local result = select('3', ...);
    local buffEffectValue = decodeJsonStrToTabel(buff.buffBean.f_BuffEffectValue);

    local fighter = nil;
    if buffEffectValue[2] == 0 then
        fighter = buff.source;
    else
        fighter = buff.target;
    end

    local attr = FighterAttributeManager.getFightAttr(fighter, buffEffectValue[3]);
    local add = attr * buffEffectValue[4] / EnumConst.TEN_THOUSANDTH + buffEffectValue[1];

    fightLog("[EFFECT]Fighter " ..buff.target.fighterId.." Buff"..buff.modelId.." 触发附加自身属性额外伤害BUFF效果");
    local damage = Mathf.Floor(result.damage + add);
    fightLog("[DAMAGE]"..buff.source.fighterId.."对"..buff.target.fighterId.."计算BUFF("..buff.modelId..")附加自身最大生命值额外伤害BUFF效果[4]结果"..subDigitalNum(damage,4));
    result.damage = damage;
    return BaseBuffEffect:action(fight, buff, ...);
end